package com.ruoyi.im.service;


import com.ruoyi.im.entity.IMSysArea;
import com.ruoyi.im.vo.IMAreaNode;
import com.ruoyi.im.vo.IMAreaTreeVo;

import java.util.List;

public interface IMAreaService {
	
	IMSysArea getById(Integer id);

	List<IMSysArea> getByShortName(String name);

	List<IMSysArea> getByPinyin(String pinyin);

	int addArea(IMSysArea area);

    //List<IMAreaTreeVo> listArea(IMSysArea user);

	public List<IMAreaTreeVo> listAreaByCityId(IMSysArea area);

	public List<IMAreaTreeVo> listAreaByCountyId(IMSysArea area);

	public List<IMAreaTreeVo> listAreaByTownId(IMSysArea area);

	/**
	 * 构建前端所需要树结构
	 *
	 * @param user 区域信息
	 * @return 树结构列表
	 */
	List<IMAreaTreeVo> listAreaTree(IMSysArea user);
	/**
	 * 构建前端所需要下拉树结构
	 *
	 * @param areaList 区域列表
	 * @return 下拉树结构列表
	 */
	public List<IMAreaNode> buildAreaTree(List<IMAreaNode> areaList);
    int updateArea(IMSysArea user);
}
